package com.zt.yongxinbao.mapper;

import com.zt.yongxinbao.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByNameAndPWD(@Param("username") String username, @Param("password") String password);

    User selectByUsername(String username);
    User selectByEmail(String email);
    List<User> selectAllUser();
    int updateEmailByUsername(@Param("username") String username, @Param("email") String email);
    int updatePasswordByUsername(@Param("username") String username, @Param("password") String password);

}